import React from 'react'
import { useOutletContext } from 'react-router'
import ProductItem from '../../components/Product'
export default function HotList() {
  const { hotList } = useOutletContext()
  return (
    <div>
      <h1>热门商品</h1>
      <div>
        {
          hotList && hotList.map((item) => (
            <ProductItem key={item.id} data={item} />
          ))
        }
      </div>
    </div>
  )
}
